<template>
  <div>
    <Comment :Comdata="comment" v-for="(comment,index) in commentsData" :key="index"></Comment>
  </div>
</template>
<script>
//引入评论组件
import Comment from "@/views/comments/comment.vue";
export default {
  components: {
    Comment
  },
  //创建评论数组
  data() {
    return {
      commentsData: [
        {
          comment: "老铁没毛病"
        },
        {
          comment: "老铁，讲的有点意思"
        },
        {
          comment: "哎哟，不错哦"
        },
        {
          comment: "是吧，我也这样觉得，很有意思",
          parent: {
            comment: "老铁，讲的有点意思"
          }
        },
        {
          comment: "从前有座山"
        },
        {
          comment: "山里有座庙",
          parent: {
            comment: "从前有座山"
          }
        },
        {
          comment: "庙里有个老和尚和小和尚",
          parent: {
            comment: "山里有座庙",
            parent: {
              comment: "从前有座山"
            }
          }
        },
        {
          comment: "老和尚给小和尚讲故事",
          parent: {
            comment: "庙里有个老和尚和小和尚",
            parent: {
              comment: "山里有座庙",
              parent: {
                comment: "从前有座山"
              }
            }
          }
        },
        {
          comment: "天王盖地虎"
        },
        {
          comment: "宝塔镇河妖",
          parent: {
            comment: "天王盖地虎"
          }
        },
        {
          comment: "摩西摩西",
          parent: {
            comment: "宝塔镇河妖",
            parent: {
              comment: "天王盖地虎"
            }
          }
        }
      ]
    };
  }
};
</script>
<style lang="less" scoped>
</style>